Optimal. Leaf size=121 \[ \frac {(2 A+B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}-\frac {A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}+\frac {A \sin (c+d x) \sqrt {\cos (c+d x)}}{a^2 d (\cos (c+d x)+1)}-\frac {(A-B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (a \cos (c+d x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.35, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2954, 2977, 2978, 2748, 2641, 2639} \[ \frac {(2 A+B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}-\frac {A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}+\frac {A \sin (c+d x) \sqrt {\cos (c+d x)}}{a^2 d (\cos (c+d x)+1)}-\frac {(A-B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (a \cos (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2748
Rule 2954
Rule 2977
Rule 2978
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^2} \, dx &=\int \frac {\sqrt {\cos (c+d x)} (B+A \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx\\ &=-\frac {(A-B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \frac {-\frac {1}{2} a (A-B)+\frac {1}{2} a (5 A+B) \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+a \cos (c+d x))} \, dx}{3 a^2}\\ &=\frac {A \sqrt {\cos (c+d x)} \sin (c+d x)}{a^2 d (1+\cos (c+d x))}-\frac {(A-B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \frac {\frac {1}{2} a^2 (2 A+B)-\frac {3}{2} a^2 A \cos (c+d x)}{\sqrt {\cos (c+d x)}} \, dx}{3 a^4}\\ &=\frac {A \sqrt {\cos (c+d x)} \sin (c+d x)}{a^2 d (1+\cos (c+d x))}-\frac {(A-B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {A \int \sqrt {\cos (c+d x)} \, dx}{2 a^2}+\frac {(2 A+B) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{6 a^2}\\ &=-\frac {A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}+\frac {(2 A+B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}+\frac {A \sqrt {\cos (c+d x)} \sin (c+d x)}{a^2 d (1+\cos (c+d x))}-\frac {(A-B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 6.57, size = 921, normalized size = 7.61 \[ -\frac {i A \csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \sec (c+d x) (A+B \sec (c+d x)) \left (\frac {2 e^{2 i d x} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right ) \sqrt {e^{-i d x} \left (2 \left (1+e^{2 i d x}\right ) \cos (c)+2 i \left (-1+e^{2 i d x}\right ) \sin (c)\right )} \sqrt {e^{2 i d x} \cos (2 c)+i e^{2 i d x} \sin (2 c)+1}}{3 i d \left (1+e^{2 i d x}\right ) \cos (c)-3 d \left (-1+e^{2 i d x}\right ) \sin (c)}-\frac {2 \, _2F_1\left (-\frac {1}{4},\frac {1}{2};\frac {3}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right ) \sqrt {e^{-i d x} \left (2 \left (1+e^{2 i d x}\right ) \cos (c)+2 i \left (-1+e^{2 i d x}\right ) \sin (c)\right )} \sqrt {e^{2 i d x} \cos (2 c)+i e^{2 i d x} \sin (2 c)+1}}{d \left (-1+e^{2 i d x}\right ) \sin (c)-i d \left (1+e^{2 i d x}\right ) \cos (c)}\right ) \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{2 (B+A \cos (c+d x)) (\sec (c+d x) a+a)^2}+\frac {(A+B \sec (c+d x)) \left (\frac {2 \sec \left (\frac {c}{2}\right ) \left (B \sin \left (\frac {d x}{2}\right )-A \sin \left (\frac {d x}{2}\right )\right ) \sec ^3\left (\frac {c}{2}+\frac {d x}{2}\right )}{3 d}+\frac {2 (B-A) \tan \left (\frac {c}{2}\right ) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right )}{3 d}+\frac {4 A \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}+\frac {4 A \csc (c)}{d}\right ) \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{\sqrt {\cos (c+d x)} (B+A \cos (c+d x)) (\sec (c+d x) a+a)^2}-\frac {4 A \csc \left (\frac {c}{2}\right ) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right ) \sec \left (\frac {c}{2}\right ) \sec (c+d x) (A+B \sec (c+d x)) \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \sqrt {1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {-\sqrt {\cot ^2(c)+1} \sin (c) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{3 d (B+A \cos (c+d x)) \sqrt {\cot ^2(c)+1} (\sec (c+d x) a+a)^2}-\frac {2 B \csc \left (\frac {c}{2}\right ) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right ) \sec \left (\frac {c}{2}\right ) \sec (c+d x) (A+B \sec (c+d x)) \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \sqrt {1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {-\sqrt {\cot ^2(c)+1} \sin (c) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{3 d (B+A \cos (c+d x)) \sqrt {\cot ^2(c)+1} (\sec (c+d x) a+a)^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.46, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {\cos \left (d x + c\right )}}{a^{2} \cos \left (d x + c\right ) \sec \left (d x + c\right )^{2} + 2 \, a^{2} \cos \left (d x + c\right ) \sec \left (d x + c\right ) + a^{2} \cos \left (d x + c\right )}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \sec \left (d x + c\right ) + A}{{\left (a \sec \left (d x + c\right ) + a\right )}^{2} \sqrt {\cos \left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 5.23, size = 350, normalized size = 2.89 \[ -\frac {\sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (12 A \left (\cos ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 A \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+2 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-20 A \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 B \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+9 A \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 B \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-A +B \right )}{6 a^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \sec \left (d x + c\right ) + A}{{\left (a \sec \left (d x + c\right ) + a\right )}^{2} \sqrt {\cos \left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{\sqrt {\cos \left (c+d\,x\right )}\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A}{\sqrt {\cos {\left (c + d x \right )}} \sec ^{2}{\left (c + d x \right )} + 2 \sqrt {\cos {\left (c + d x \right )}} \sec {\left (c + d x \right )} + \sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {B \sec {\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}} \sec ^{2}{\left (c + d x \right )} + 2 \sqrt {\cos {\left (c + d x \right )}} \sec {\left (c + d x \right )} + \sqrt {\cos {\left (c + d x \right )}}}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________